package com.zxy.supplier_system.server.repository

import com.zxy.supplier_system.server.entity.WechatUserInfo
import org.springframework.data.jpa.repository.JpaRepository

interface WechatUserInfoRepository: JpaRepository<WechatUserInfo, Int>{


    fun findByOfficialAccountOpenIdIsNullAndUnionId(unionId: String): WechatUserInfo?

    fun findByOfficialAccountOpenId(officialAccountOpenId:String): WechatUserInfo?

    fun findByOfficialAccountOpenIdIn(officialAccountOpenIdList:List<String>): List<WechatUserInfo>

    fun findByUnionId(unionId: String): WechatUserInfo?

    fun findByUnionIdOrMiniProgramOpenId(unionId: String, miniProgramOpenId: String):WechatUserInfo?
}
